package com.client.controller;


import com.client.common.R;
import com.client.pojo.FlowerGoods;
import com.client.service.FlowerTypesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 晚云
 * @since 2023-09-14
 */
@CrossOrigin
@RestController
@RequestMapping("/flower-types")
public class FlowerTypesController {

    @Autowired
    private FlowerTypesService flowerTypesService;


    /**
     * 查询不同的商品
     * @param typeId
     * @return
     */
    @GetMapping("/list/{type}")
    public R list(@PathVariable("type") int typeId){
        List<FlowerGoods> list = flowerTypesService.query_List(typeId);
        return R.success(list);
    }
}

